#ifndef ScrollBar_First
#define ScrollBar_First
#ifdef __GNUG__
#pragma interface
#endif

#include "Box.h"

class Slider;

enum {
	eScrollBarUpLeft = cPartLast + 0,
	eScrollBarDownRight,
	eScrollBarSlider
};

//---- ScrollBar ---------------------------------------------------------------

class ScrollBar: public Expander {
public:
	MetaDef(ScrollBar);
	ScrollBar(int id= cIdNone, Direction d= eHor);

	void SetAll(const Point &extent, const Point &thumbrange, const Point &maxvalue);
	void SetMax(const Point &);
	void SetVal(const Point &);
	void SetThumbRange(const Point &);
	void Control(int id, int part, void *val);

protected:
	virtual VObject *MakePart(int id);
	virtual void MakeParts();
	void SetContainer(VObject *v);
	void Draw(Rectangle r);

protected:
	Slider *slider;
	Direction dir;
};

#endif

